package pers.mine.vo;

/**
 * 网页提示信息封装类
 * 
 * @author Mine
 * @since 2016年10月21日_上午9:58:35
 */
public class Info {
	public static final String INFO = "alert-info";
	public static final String SUCCESS = "alert-success";
	public static final String ERROR = "alert-error";
	public static final String DEFAULT = "";

	public static final String SPAN_WARNING = " label badge-warning";
	public static final String SPAN_INFO = " label badge-info ";
	public static final String SPAN_SUCCESS = "label badge-success";
	public static final String SPAN_IMPORTANT = " label badge-important ";
	public static final String SPAN_DEFAULT = " label ";
	// 一个flag 用于指定下一级不要修改
	private boolean canChange = true;

	/**
	 * @param type
	 * @param title
	 * @param msg
	 */
	public Info(String type, String title, String msg) {
		super();
		this.type = type;
		this.title = title;
		this.msg = msg;
	}

	public Info() {
		super();
	}

	private String type;
	private String title;
	private String emoji;
	private String msg;

	public String getType() {
		return type;
	}

	public void setType(String type) {
		if (Info.SUCCESS.equals(type)) {
			this.setEmoji("(O ^ ~ ^ O)ψ");
			this.setTitle("好消息");
		} else if (Info.INFO.equals(type)) {
			this.setEmoji("(～￣▽￣)～*");
			this.setTitle("信息");
		} else if (Info.ERROR.equals(type)) {
			this.setEmoji("(；°○° )");
			this.setTitle("错误");
		} else {
			this.setTitle("警告");
			this.setEmoji(" (⊙ˍ⊙)");
		}
		this.type = type;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getEmoji() {
		return emoji;
	}

	public void setEmoji(String emoji) {
		this.emoji = emoji;
	}

	public boolean isCanChange() {
		return canChange;
	}

	public void setCanChange(boolean canChange) {
		this.canChange = canChange;
	}

	public void clear() {
		this.canChange = true;
	}

}
